package com.youngball.shiro.entity;

import java.util.List;

/**
 * Created by Administrator on 2015/6/2.
 */
public class ChildResource implements Comparable<ChildResource> {

    public Resource getResource() {
        return resource;
    }

    public void setResource(Resource resource) {
        this.resource = resource;
    }

    public ChildResource(Resource resource) {
        this.resource = resource;
    }

    List<Resource> childs;

    public ChildResource() {
        super();
    }

    Resource resource;

    public ChildResource(List<Resource> childs, Resource resource) {
        this.childs = childs;
        this.resource = resource;
    }

    public List<Resource> getChilds() {
        return childs;
    }

    public void setChilds(List<Resource> childs) {
        this.childs = childs;
    }

    @Override
    public int compareTo(ChildResource o) {
        return this.getResource().getId().compareTo(o.getResource().getId());
    }
}
